/* 网站生成器全局样式 */
:root {
  --primary-color: #165DFF;
  --secondary-color: #36CFC9;
  --success-color: #00B42A;
  --warning-color: #FF7D00;
  --danger-color: #F53F3F;
  --info-color: #86909C;
  --text-color: #1D2129;
  --text-secondary: #4E5969;
  --border-color: #E5E6EB;
  --bg-color: #F8F9FA;
  --card-bg: #FFFFFF;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.1);
  --border-radius: 8px;
  --transition: all 0.3s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 容器样式 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 头部样式 */
.header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 60px 0;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}

.header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('');
  opacity: 0.3;
}

.header .container {
  position: relative;
  z-index: 1;
}

.header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

.header p {
  font-size: 1.125rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* 卡片样式 */
.component-card {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  transition: var(--transition);
  cursor: pointer;
  background-color: var(--card-bg);
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.component-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transform: scaleX(0);
  transition: var(--transition);
}

.component-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.component-card:hover::before {
  transform: scaleX(1);
}

.component-card.selected {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(22, 93, 255, 0.2);
}

.component-card.selected::before {
  transform: scaleX(1);
}

.component-card .card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.component-card .card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-color);
}

.component-icon {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 15px;
  transition: var(--transition);
}

.component-card:hover .component-icon {
  transform: scale(1.1);
  color: var(--primary-color);
}

/* 按钮样式 */
.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 6px;
  transition: var(--transition);
  user-select: none;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: #0E4BDB;
  border-color: #0E4BDB;
  color: white;
}

.btn-primary:focus {
  box-shadow: 0 0 0 0.2rem rgba(22, 93, 255, 0.25);
}

.btn-secondary {
  background-color: #F2F3F5;
  border-color: #F2F3F5;
  color: var(--text-color);
}

.btn-secondary:hover {
  background-color: #E5E6EB;
  border-color: #E5E6EB;
  color: var(--text-color);
}

.btn-outline-purple {
  border-color: #722ED1;
  color: #722ED1;
  background-color: transparent;
}

.btn-outline-purple:hover {
  background-color: #722ED1;
  color: white;
  border-color: #722ED1;
}

/* AI功能介绍 */
.ai-feature {
  background-color: rgba(114, 46, 209, 0.1);
  border-left: 4px solid #722ED1;
  padding: 15px;
  margin: 20px 0;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.ai-feature h4 {
  color: #722ED1;
  margin-bottom: 10px;
  font-size: 1.125rem;
  font-weight: 600;
}

.ai-feature p {
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* 表单样式 */
.form-check {
  position: relative;
  display: block;
  padding-left: 1.5rem;
}

.form-check-input {
  position: absolute;
  margin-top: 0.25rem;
  margin-left: -1.5rem;
}

.form-check-label {
  margin-bottom: 0;
}

/* 模态框样式 */
.modal-content {
  border-radius: var(--border-radius);
  border: none;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  border-top: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
}

/* 加载动画 */
.spinner-border {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  vertical-align: text-bottom;
  border: 0.25em solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
  to {
    transform: rotate(360deg);
  }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .header {
    padding: 40px 0;
  }
  
  .header h1 {
    font-size: 2rem;
  }
  
  .header p {
    font-size: 1rem;
  }
  
  .component-card {
    margin-bottom: 20px;
  }
  
  .row {
    margin-left: -10px;
    margin-right: -10px;
  }
  
  .col-md-4 {
    padding-left: 10px;
    padding-right: 10px;
  }
  
  .text-right {
    text-align: left !important;
    margin-top: 10px;
  }
  
  #select-all, #deselect-all {
    margin-right: 10px !important;
    margin-bottom: 10px;
  }
}

@media (max-width: 576px) {
  .header h1 {
    font-size: 1.75rem;
  }
  
  .btn-lg {
    width: 100%;
    padding: 0.75rem 1.5rem;
  }
  
  .modal-dialog {
    margin: 10px;
  }
}